<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<script type="text/javascript" src="ValidacionesJS.js"></script>
<style type="text/css">
.class1 A:link {
	text-decoration: none
}

.class1 A:visited {
	text-decoration: none
}

.class1 A:active {
	text-decoration: none
}

.class1 A:hover {
	text-decoration: none;
	color: red;
}

.class1 A img {
	border: none;
}

.class2 A:link {
	text-decoration: underline overline
}

.class2 A:visited {
	text-decoration: underline overline
}

.class2 A:active {
	text-decoration: underline overline
}

.class2 A:hover {
	text-decoration: underline;
	color: green;
}
</style>
<%@page import="FulbitoFacil.negocio.GestionLocal,java.util.*"%>
<%@page import="FulbitoFacil.negocio.GestionHorario"%>
<%@page import="FulbitoFacil.modelo.Cancha"%>
<%@page import="FulbitoFacil.modelo.Local"%>
<%@page import="FulbitoFacil.modelo.Horario"%>
<%
	GestionLocal neg = new GestionLocal();
	Collection<Local> lstLocal = new ArrayList<Local>();
	lstLocal = neg.ListarLocal();
	request.setAttribute("Listadolocales", lstLocal);
%>

<%
	String accion = request.getParameter("accion");
	if (accion == null) {
		accion = "n";
	}
	if (accion.equals("n")) {
%>

<fieldset>
	<form name="RegistrarCancha" action="InsertarCanchaServlet" method="post"	onSubmit="return ValidarRegistroCancha();">
		<div id="nav" class="nav">
			<ul>
				<li>Registro de Nueva Cancha</li>
			</ul>
		</div>
		<table border="0">
			<tr>
				<td><font class="labels">Seleccione Local</font></td>
				<td><input type="text" name="nomcancha" size="40" class="texto"></td>
			</tr>
			<tr>
				<td><font class="labels">Nombre Cancha</font></td>
				<td><input type="text" name="nomcancha" size="40" class="texto"></td>
			</tr>
		
			<tr>
				<td><font class="labels">Foto</font></td>
				<td><input type="text" name="foto" size="40" class="texto"></td>
			</tr>
			<tr>
				<td><button type="reset">Cancelar</button></td>
				<td>
					<table border="0" width="100%">
						<tr>
							<td>
								<button type="submit">Registrar Sala</button>
							</td>
					</table>
				</td>
			</tr>
		</table>
	</form>
</fieldset>
<%
	} else if (accion.equals("u")) {
		Cancha objCancha = (Cancha) request.getAttribute("cancha");

		request.setAttribute("idCancha", objCancha.getCodCancha());

	}
%>

